package swimv2.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import javax.persistence.*;

@Entity
@Table (name ="Request")
@PrimaryKeyJoinColumn(name="MESSAGE_ID",referencedColumnName="MESSAGE_ID")
public class Request extends Message implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public Request()
	{
		this.isPublic = true;
	}
	
	@Column (name = "isPublic")
	private boolean isPublic;

	@OneToOne(fetch=FetchType.LAZY, mappedBy="request")
	private Feedback feedback;
	
	/**
	 * @return the isPublic
	 */
	public boolean isPublic() {
		return isPublic;
	}

	/**
	 * @param isPublic the isPublic to set
	 */
	public void setPublic(boolean isPublic) {
		this.isPublic = isPublic;
	}

	/**
	 * @return the feedback
	 */
	public Feedback getFeedback() {
		return feedback;
	}

	/**
	 * @param feedback the feedback to set
	 */
	public void setFeedback(Feedback feedback) {
		this.feedback = feedback;
	}
}
